<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "user_wechat_info".
 *
 * @property int $user_id 用户ID,取user
 * @property string $openid 微信openid
 * @property string $avatar_url 头像地址
 * @property string $country 国家
 * @property string $city 城市
 * @property int $gender 性别:0未知,1男,2女
 * @property string $nickname 微信名称
 * @property string $province 省份
 *
 * @property User $user
 */
class UserWechatInfo extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'user_wechat_info';
    }

    /**
     * Gets query for [[User]].
     *
     * @return \yii\db\ActiveQuery
     */
    public function getUser()
    {
        return $this->hasOne(User::className(), ['user_id' => 'user_id']);
    }
}
